<!DOCTYPE html>
<html lang="zh-CN">
<head>
  <meta charset="UTF-8">
<meta name="viewport" content="width=device-width">
<meta name="theme-color" content="#222">
<meta name="generator" content="Hexo 5.4.0">


  <link rel="apple-touch-icon" sizes="180x180" href="/images/apple-touch-icon-next.png">
  <link rel="icon" type="image/png" sizes="32x32" href="/images/favicon-32x32-next.png">
  <link rel="icon" type="image/png" sizes="16x16" href="/images/favicon-16x16-next.png">
  <link rel="mask-icon" href="/images/logo.svg" color="#222">

<link rel="stylesheet" href="/css/main.css">



<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@fortawesome/fontawesome-free@5.15.4/css/all.min.css" integrity="sha256-mUZM63G8m73Mcidfrv5E+Y61y7a12O5mW4ezU3bxqW4=" crossorigin="anonymous">
  <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/animate.css@3.1.1/animate.min.css" integrity="sha256-PR7ttpcvz8qrF57fur/yAx1qXMFJeJFiA6pSzWi0OIE=" crossorigin="anonymous">

<script class="next-config" data-name="main" type="application/json">{"hostname":"zhengmingpei.gitee.io","root":"/","images":"/images","scheme":"Pisces","darkmode":false,"version":"8.8.1","exturl":false,"sidebar":{"position":"left","display":"post","padding":18,"offset":12},"copycode":false,"bookmark":{"enable":false,"color":"#222","save":"auto"},"mediumzoom":false,"lazyload":false,"pangu":false,"comments":{"style":"tabs","active":null,"storage":true,"lazyload":false,"nav":null},"stickytabs":false,"motion":{"enable":true,"async":false,"transition":{"post_block":"fadeIn","post_header":"fadeInDown","post_body":"fadeInDown","coll_header":"fadeInLeft","sidebar":"fadeInUp"}},"prism":false,"i18n":{"placeholder":"搜索...","empty":"没有找到任何搜索结果：${query}","hits_time":"找到 ${hits} 个搜索结果（用时 ${time} 毫秒）","hits":"找到 ${hits} 个搜索结果"}}</script><script src="/js/config.js"></script>
<meta property="og:type" content="website">
<meta property="og:title" content="郑明培的个人博客">
<meta property="og:url" content="https://zhengmingpei.gitee.io/page/3/index.html">
<meta property="og:site_name" content="郑明培的个人博客">
<meta property="og:locale" content="zh_CN">
<meta property="article:author" content="zhengmingpei">
<meta property="article:tag" content="编程,软件,个人感悟">
<meta name="twitter:card" content="summary">


<link rel="canonical" href="https://zhengmingpei.gitee.io/page/3/">



<script class="next-config" data-name="page" type="application/json">{"sidebar":"","isHome":true,"isPost":false,"lang":"zh-CN","comments":"","permalink":"","path":"page/3/index.html","title":""}</script>

<script class="next-config" data-name="calendar" type="application/json">""</script>
<title>郑明培的个人博客</title>
  




  <noscript>
    <link rel="stylesheet" href="/css/noscript.css">
  </noscript>
</head>

<body itemscope itemtype="http://schema.org/WebPage" class="use-motion">
  <div class="headband"></div>

  <main class="main">
    <header class="header" itemscope itemtype="http://schema.org/WPHeader">
      <div class="header-inner"><div class="site-brand-container">
  <div class="site-nav-toggle">
    <div class="toggle" aria-label="切换导航栏" role="button">
        <span class="toggle-line"></span>
        <span class="toggle-line"></span>
        <span class="toggle-line"></span>
    </div>
  </div>

  <div class="site-meta">

    <a href="/" class="brand" rel="start">
      <i class="logo-line"></i>
      <h1 class="site-title">郑明培的个人博客</h1>
      <i class="logo-line"></i>
    </a>
  </div>

  <div class="site-nav-right">
    <div class="toggle popup-trigger">
    </div>
  </div>
</div>



<nav class="site-nav">
  <ul class="main-menu menu">
        <li class="menu-item menu-item-home"><a href="/" rel="section"><i class="home fa-fw"></i>首页</a></li>
        <li class="menu-item menu-item-archives"><a href="/archives" rel="section"><i class="archive fa-fw"></i>归档</a></li>
        <li class="menu-item menu-item-about"><a href="/about" rel="section"><i class="user fa-fw"></i>关于</a></li>
        <li class="menu-item menu-item-categories"><a href="/categories" rel="section"><i class="th fa-fw"></i>分类</a></li>
        <li class="menu-item menu-item-tags"><a href="/tags" rel="section"><i class="tags fa-fw"></i>标签</a></li>
  </ul>
</nav>




</div>
        
  
  <div class="toggle sidebar-toggle" role="button">
    <span class="toggle-line"></span>
    <span class="toggle-line"></span>
    <span class="toggle-line"></span>
  </div>

  <aside class="sidebar">

    <div class="sidebar-inner sidebar-overview-active">
      <ul class="sidebar-nav">
        <li class="sidebar-nav-toc">
          文章目录
        </li>
        <li class="sidebar-nav-overview">
          站点概览
        </li>
      </ul>

      <div class="sidebar-panel-container">
        <!--noindex-->
        <div class="post-toc-wrap sidebar-panel">
        </div>
        <!--/noindex-->

        <div class="site-overview-wrap sidebar-panel">
          <div class="site-author site-overview-item animated" itemprop="author" itemscope itemtype="http://schema.org/Person">
  <p class="site-author-name" itemprop="name">zhengmingpei</p>
  <div class="site-description" itemprop="description"></div>
</div>
<div class="site-state-wrap site-overview-item animated">
  <nav class="site-state">
      <div class="site-state-item site-state-posts">
        <a href="/archives">
          <span class="site-state-item-count">36</span>
          <span class="site-state-item-name">日志</span>
        </a>
      </div>
      <div class="site-state-item site-state-categories">
          <a href="/categories">
        <span class="site-state-item-count">4</span>
        <span class="site-state-item-name">分类</span></a>
      </div>
      <div class="site-state-item site-state-tags">
          <a href="/tags">
        <span class="site-state-item-count">41</span>
        <span class="site-state-item-name">标签</span></a>
      </div>
  </nav>
</div>
  <div class="links-of-author site-overview-item animated">
      <span class="links-of-author-item">
        <a href="https://github.com/zhengmingpei" title="GitHub → https:&#x2F;&#x2F;github.com&#x2F;zhengmingpei" rel="noopener" target="_blank"><i class="github fa-fw"></i>GitHub</a>
      </span>
      <span class="links-of-author-item">
        <a href="https://gitee.com/zhengmingpei" title="gitee → https:&#x2F;&#x2F;gitee.com&#x2F;zhengmingpei" rel="noopener" target="_blank">gitee</a>
      </span>
      <span class="links-of-author-item">
        <a href="https://space.bilibili.com/32918983" title="bilibili → https:&#x2F;&#x2F;space.bilibili.com&#x2F;32918983" rel="noopener" target="_blank">bilibili</a>
      </span>
  </div>



        </div>
      </div>
    </div>
  </aside>
  <div class="sidebar-dimmer"></div>


    </header>

    
  <div class="back-to-top" role="button" aria-label="返回顶部">
    <i class="fa fa-arrow-up"></i>
    <span>0%</span>
  </div>

<noscript>
  <div class="noscript-warning">Theme NexT works best with JavaScript enabled</div>
</noscript>


    <div class="main-inner index posts-expand">

    


<div class="post-block">
  
  

  <article itemscope itemtype="http://schema.org/Article" class="post-content" lang="">
    <link itemprop="mainEntityOfPage" href="https://zhengmingpei.gitee.io/2015/04/25/windowsphone8_1/">

    <span hidden itemprop="author" itemscope itemtype="http://schema.org/Person">
      <meta itemprop="image" content="/images/avatar.gif">
      <meta itemprop="name" content="zhengmingpei">
      <meta itemprop="description" content="">
    </span>

    <span hidden itemprop="publisher" itemscope itemtype="http://schema.org/Organization">
      <meta itemprop="name" content="郑明培的个人博客">
    </span>
      <header class="post-header">
        <h2 class="post-title" itemprop="name headline">
          <a href="/2015/04/25/windowsphone8_1/" class="post-title-link" itemprop="url">入手WindowsPhone8.1</a>
        </h2>

        <div class="post-meta-container">
          <div class="post-meta">
    <span class="post-meta-item">
      <span class="post-meta-item-icon">
        <i class="far fa-calendar"></i>
      </span>
      <span class="post-meta-item-text">发表于</span>

      <time title="创建时间：2015-04-25 15:00:00" itemprop="dateCreated datePublished" datetime="2015-04-25T15:00:00+08:00">2015-04-25</time>
    </span>
      <span class="post-meta-item">
        <span class="post-meta-item-icon">
          <i class="far fa-calendar-check"></i>
        </span>
        <span class="post-meta-item-text">更新于</span>
        <time title="修改时间：2021-11-28 12:11:13" itemprop="dateModified" datetime="2021-11-28T12:11:13+08:00">2021-11-28</time>
      </span>
    <span class="post-meta-item">
      <span class="post-meta-item-icon">
        <i class="far fa-folder"></i>
      </span>
      <span class="post-meta-item-text">分类于</span>
        <span itemprop="about" itemscope itemtype="http://schema.org/Thing">
          <a href="/categories/%E5%A4%A7%E5%AD%A6/" itemprop="url" rel="index"><span itemprop="name">大学</span></a>
        </span>
    </span>

  
</div>

        </div>
      </header>

    
    
    
    <div class="post-body" itemprop="articleBody">
          <p>现在的生活节奏很乱，忽然发现好久没有更新博客了。恰好周二从国美电器购得的<code>Nokia Lumia530</code>到了，把玩了快一星期了，想写点入手后的感想。</p>
<p>拆箱图如下：<br><img src="/2015/04/25/windowsphone8_1/chaixiang-1.png" alt="chaixiang"></p>
<p>因为现在还在学生阶段，手头不宽裕，这次换手机选择了这款超级低价的WindowsPhone入门机，加邮费接近430RMB。</p>
<p>之前用腻了安卓机，听人说WP手机还是不错的，而且毕竟是诺基亚出品，质量有口皆碑啊。</p>
<p><code>Nokia Lumia530</code>的配置非常低端，内存512MB，4寸显示屏，无前置摄像头，无调焦传感器之类，无需再述。这里我要谈的是优点：</p>
<ol>
<li>可以更新到最新的WindowsPhone系统，带有Cortana(中文版叫做小娜)，将来应该可以更新到Win10。</li>
<li>虽然内存大小只有512MB，但运行起来感觉还是比较流畅的，界面切换和滑动不存在明显的卡顿；至于运行应用方面，官方商店的多数应用和游戏可以安装并流畅使用。下面放几张截图：</li>
</ol>
<p>Metro界面：<br><img src="/2015/04/25/windowsphone8_1/wp_ss_20150425_0003.png" alt="wpss201504250003"><br>小娜：<br><img src="/2015/04/25/windowsphone8_1/wp_ss_20150425_0005.png" alt="wpss201504250005"><br>锁屏界面：<br><img src="/2015/04/25/windowsphone8_1/wp_ss_20150422_0004.png" alt="wpss201504220004"> </p>
<p>总的来说，这款机型可以完整体现WindowsPhone8.1的特色，是用来尝试WP系统的不错选择。其实自己喜欢的，用起来顺手就好。最后上一张天后王菲的Music截图：<br><img src="/2015/04/25/windowsphone8_1/wp_ss_20150425_0002.png" alt="wpss201504250002"></p>

      
    </div>

    
    
    

    <footer class="post-footer">
        <div class="post-eof"></div>
      
    </footer>
  </article>
</div>




    


<div class="post-block">
  
  

  <article itemscope itemtype="http://schema.org/Article" class="post-content" lang="">
    <link itemprop="mainEntityOfPage" href="https://zhengmingpei.gitee.io/2015/03/16/%E8%BF%9C%E7%A8%8B%E6%A1%8C%E9%9D%A2/">

    <span hidden itemprop="author" itemscope itemtype="http://schema.org/Person">
      <meta itemprop="image" content="/images/avatar.gif">
      <meta itemprop="name" content="zhengmingpei">
      <meta itemprop="description" content="">
    </span>

    <span hidden itemprop="publisher" itemscope itemtype="http://schema.org/Organization">
      <meta itemprop="name" content="郑明培的个人博客">
    </span>
      <header class="post-header">
        <h2 class="post-title" itemprop="name headline">
          <a href="/2015/03/16/%E8%BF%9C%E7%A8%8B%E6%A1%8C%E9%9D%A2/" class="post-title-link" itemprop="url">远程桌面，让工作更高效</a>
        </h2>

        <div class="post-meta-container">
          <div class="post-meta">
    <span class="post-meta-item">
      <span class="post-meta-item-icon">
        <i class="far fa-calendar"></i>
      </span>
      <span class="post-meta-item-text">发表于</span>

      <time title="创建时间：2015-03-16 15:00:00" itemprop="dateCreated datePublished" datetime="2015-03-16T15:00:00+08:00">2015-03-16</time>
    </span>
      <span class="post-meta-item">
        <span class="post-meta-item-icon">
          <i class="far fa-calendar-check"></i>
        </span>
        <span class="post-meta-item-text">更新于</span>
        <time title="修改时间：2021-11-28 12:08:27" itemprop="dateModified" datetime="2021-11-28T12:08:27+08:00">2021-11-28</time>
      </span>
    <span class="post-meta-item">
      <span class="post-meta-item-icon">
        <i class="far fa-folder"></i>
      </span>
      <span class="post-meta-item-text">分类于</span>
        <span itemprop="about" itemscope itemtype="http://schema.org/Thing">
          <a href="/categories/%E5%A4%A7%E5%AD%A6/" itemprop="url" rel="index"><span itemprop="name">大学</span></a>
        </span>
    </span>

  
</div>

        </div>
      </header>

    
    
    
    <div class="post-body" itemprop="articleBody">
          <h2 id="网络的终极奥义！"><a href="#网络的终极奥义！" class="headerlink" title="网络的终极奥义！"></a>网络的终极奥义！</h2><p>不知不觉就到了大三下学期，迎来了很多很麻烦的事情。<br>不过生活中总会有许多惊喜出现，比如，这次发现了远程桌面这个东东，去学校机房蹭大屏显示器变得便捷无比，再也不用随身带着U盘的资料了！这简直就体现了网络的终极奥义啊！</p>
          <!--noindex-->
            <div class="post-button">
              <a class="btn" href="/2015/03/16/%E8%BF%9C%E7%A8%8B%E6%A1%8C%E9%9D%A2/#more" rel="contents">
                阅读全文 &raquo;
              </a>
            </div>
          <!--/noindex-->
        
      
    </div>

    
    
    

    <footer class="post-footer">
        <div class="post-eof"></div>
      
    </footer>
  </article>
</div>




    


<div class="post-block">
  
  

  <article itemscope itemtype="http://schema.org/Article" class="post-content" lang="">
    <link itemprop="mainEntityOfPage" href="https://zhengmingpei.gitee.io/2015/02/13/pandoc/">

    <span hidden itemprop="author" itemscope itemtype="http://schema.org/Person">
      <meta itemprop="image" content="/images/avatar.gif">
      <meta itemprop="name" content="zhengmingpei">
      <meta itemprop="description" content="">
    </span>

    <span hidden itemprop="publisher" itemscope itemtype="http://schema.org/Organization">
      <meta itemprop="name" content="郑明培的个人博客">
    </span>
      <header class="post-header">
        <h2 class="post-title" itemprop="name headline">
          <a href="/2015/02/13/pandoc/" class="post-title-link" itemprop="url">Pandoc的使用</a>
        </h2>

        <div class="post-meta-container">
          <div class="post-meta">
    <span class="post-meta-item">
      <span class="post-meta-item-icon">
        <i class="far fa-calendar"></i>
      </span>
      <span class="post-meta-item-text">发表于</span>

      <time title="创建时间：2015-02-13 15:00:00" itemprop="dateCreated datePublished" datetime="2015-02-13T15:00:00+08:00">2015-02-13</time>
    </span>
      <span class="post-meta-item">
        <span class="post-meta-item-icon">
          <i class="far fa-calendar-check"></i>
        </span>
        <span class="post-meta-item-text">更新于</span>
        <time title="修改时间：2021-11-28 12:06:42" itemprop="dateModified" datetime="2021-11-28T12:06:42+08:00">2021-11-28</time>
      </span>
    <span class="post-meta-item">
      <span class="post-meta-item-icon">
        <i class="far fa-folder"></i>
      </span>
      <span class="post-meta-item-text">分类于</span>
        <span itemprop="about" itemscope itemtype="http://schema.org/Thing">
          <a href="/categories/%E5%A4%A7%E5%AD%A6/" itemprop="url" rel="index"><span itemprop="name">大学</span></a>
        </span>
    </span>

  
</div>

        </div>
      </header>

    
    
    
    <div class="post-body" itemprop="articleBody">
          <h2 id="前言"><a href="#前言" class="headerlink" title="前言"></a>前言</h2><p>Markdown自诞生以来就具备极低的入门难度，使书写博客变得简单。但是在某些时候，我们还是需要其他格式的文本，比如html,pdf，Pandoc正是这样一个用来实现文本格式转换的渲染器。</p>
<h2 id="安装"><a href="#安装" class="headerlink" title="安装"></a>安装</h2><p>官网在<a target="_blank" rel="noopener" href="http://johnmacfarlane.net/pandoc/">这里</a>，有各个平台的安装说明。对于debian系列的Linux发行改版，使用包管理器进行安装是最方便的，即：</p>
<figure class="highlight bash"><table><tr><td class="code"><pre><span class="line">sudo apt-get install pandoc</span><br></pre></td></tr></table></figure>


<p>不推荐Windows平台。</p>
<p>注意：PDF格式比较特殊，需要LaTeX，官网推荐使用Texlive，安装方法即：</p>
<figure class="highlight bash"><table><tr><td class="code"><pre><span class="line">sudo apt-get install texlive</span><br></pre></td></tr></table></figure>

<p>因为还要处理中文问题之类，我认为去<a target="_blank" rel="noopener" href="https://www.tug.org/texlive/">Texlive官网</a>下载一个ISO镜像安装最为方便，安装步骤可见<a href="/linux%E9%85%8D%E7%BD%AE/2014/07/07/install-tex/">我的博客</a>。</p>
<h2 id="使用"><a href="#使用" class="headerlink" title="使用"></a>使用</h2><h3 id="Markdown-gt-html"><a href="#Markdown-gt-html" class="headerlink" title="Markdown-&gt;html"></a>Markdown-&gt;html</h3><p>首先写一个Markdown文件，命名为<code>test.md</code>,用来测试的内容如下：</p>
<figure class="highlight markdown"><table><tr><td class="code"><pre><span class="line"><span class="section">Ubuntu12.04 64bit安装后要做的配置</span></span><br><span class="line"><span class="section">========================</span></span><br><span class="line">最近把系统换成了Ubuntu12.04.04 64bit单系统，遇到些配置的问题</span><br><span class="line"></span><br><span class="line"><span class="section">## 1.给浏览器安装Flash。</span></span><br><span class="line"></span><br><span class="line">进入Adobe的[<span class="string">官方网址</span>](<span class="link">http://get.adobe.com/cn/flashplayer/</span>)，选择APT适用于Ubuntu10.04+，跳出请选择打开的程序，选择<span class="code">`/usr/bin/apturl`</span></span><br><span class="line"></span><br><span class="line"><span class="section">## 2.卸载无用的预装软件，比如通讯工具。</span></span><br><span class="line"></span><br><span class="line"><span class="section">## 3.安装Vim,VirturlBox。</span></span><br><span class="line">VirtualBox共享文件夹可能存在问题比如访问无权限，可能需要参照[<span class="string">这个文章</span>](<span class="link">http://www.crifan.com/can_not_access_share_folder_in_ubuntu_virtualbox/</span>)。</span><br><span class="line">关键是添加用户到boxsf组中，关键命令是：</span><br><span class="line"></span><br><span class="line"><span class="code">` sudo adduser yourname vboxsf `</span> </span><br><span class="line"></span><br><span class="line"><span class="section">## 4.安装MP3,RMVB播放的插件，打开7z压缩包的插件。</span></span><br><span class="line">根据系统提示安装。</span><br></pre></td></tr></table></figure>

<p>执行：</p>
<figure class="highlight bash"><table><tr><td class="code"><pre><span class="line">pandoc --ascii test.md -o out.html</span><br></pre></td></tr></table></figure>

<p>如果安装成功，将会生成一个相应的html文件，其中<code>--ascii</code>选项是为了使中文不发生乱码。</p>
<h3 id="Markdown-gt-PDF"><a href="#Markdown-gt-PDF" class="headerlink" title="Markdown-&gt;PDF"></a>Markdown-&gt;PDF</h3><p>Markdown文件同上，不过要按照上文所说，安装好Texlive，执行：</p>
<figure class="highlight bash"><table><tr><td class="code"><pre><span class="line">pandoc test.md -o out.pdf --latex-engine=xelatex</span><br></pre></td></tr></table></figure>

<p>如果生成的PDF中没有中文，说明字体设置上存在问题，本部分需要参考<a target="_blank" rel="noopener" href="http://zhouyichu.com/misc/Pandoc.html">Flyaway’s Blog</a>，使用<a target="_blank" rel="noopener" href="https://github.com/tzengyuxio/pages/tree/gh-pages/pandoc">tzengyuxio</a>的<code>pm-template.latex4</code>模板替换<code>/usr/share/pandoc/data/templates/default.latex</code>，而且要将里面的字体改为系统具有的字体比如<code>SimSun</code>，然后就OK了。</p>

      
    </div>

    
    
    

    <footer class="post-footer">
        <div class="post-eof"></div>
      
    </footer>
  </article>
</div>




    


<div class="post-block">
  
  

  <article itemscope itemtype="http://schema.org/Article" class="post-content" lang="">
    <link itemprop="mainEntityOfPage" href="https://zhengmingpei.gitee.io/2015/02/12/install-tex/">

    <span hidden itemprop="author" itemscope itemtype="http://schema.org/Person">
      <meta itemprop="image" content="/images/avatar.gif">
      <meta itemprop="name" content="zhengmingpei">
      <meta itemprop="description" content="">
    </span>

    <span hidden itemprop="publisher" itemscope itemtype="http://schema.org/Organization">
      <meta itemprop="name" content="郑明培的个人博客">
    </span>
      <header class="post-header">
        <h2 class="post-title" itemprop="name headline">
          <a href="/2015/02/12/install-tex/" class="post-title-link" itemprop="url">安装TeX及中文支持</a>
        </h2>

        <div class="post-meta-container">
          <div class="post-meta">
    <span class="post-meta-item">
      <span class="post-meta-item-icon">
        <i class="far fa-calendar"></i>
      </span>
      <span class="post-meta-item-text">发表于</span>

      <time title="创建时间：2015-02-12 15:00:00" itemprop="dateCreated datePublished" datetime="2015-02-12T15:00:00+08:00">2015-02-12</time>
    </span>
      <span class="post-meta-item">
        <span class="post-meta-item-icon">
          <i class="far fa-calendar-check"></i>
        </span>
        <span class="post-meta-item-text">更新于</span>
        <time title="修改时间：2021-11-28 12:04:44" itemprop="dateModified" datetime="2021-11-28T12:04:44+08:00">2021-11-28</time>
      </span>
    <span class="post-meta-item">
      <span class="post-meta-item-icon">
        <i class="far fa-folder"></i>
      </span>
      <span class="post-meta-item-text">分类于</span>
        <span itemprop="about" itemscope itemtype="http://schema.org/Thing">
          <a href="/categories/%E5%A4%A7%E5%AD%A6/" itemprop="url" rel="index"><span itemprop="name">大学</span></a>
        </span>
    </span>

  
</div>

        </div>
      </header>

    
    
    
    <div class="post-body" itemprop="articleBody">
          <p>2015.2.12更新：<br>下面的笔记适用于在基于debian的发行版(比如Ubuntu、LinuxMint)安装Texlive2013、2014；<br>第一步根据本机状况，可能不需要；<br>Texlive2014已经可以下载安装了，下面的所有“2013”更改为“2014”，安装Texlive2014正常。</p>
<h2 id="1-Ubuntu卸载旧的Texlive2009"><a href="#1-Ubuntu卸载旧的Texlive2009" class="headerlink" title="1.Ubuntu卸载旧的Texlive2009"></a>1.Ubuntu卸载旧的Texlive2009</h2><p>Try the following commands, one after another. If you progress, respective folders may already be deleted:</p>
<figure class="highlight bash"><table><tr><td class="code"><pre><span class="line">sudo apt-get purge texlive*  </span><br><span class="line">rm -rf /usr/<span class="built_in">local</span>/texlive/2009 and rm -rf ~/.texlive2009  </span><br><span class="line">rm -rf /usr/<span class="built_in">local</span>/share/texmf  </span><br><span class="line">rm -rf /var/lib/texmf  </span><br><span class="line">rm -rf /etc/texmf  </span><br><span class="line">sudo apt-get remove tex-common --purge  </span><br><span class="line">rm -rf ~/.texlive  </span><br></pre></td></tr></table></figure>
<h2 id="2-安装texlive-2013"><a href="#2-安装texlive-2013" class="headerlink" title="2.安装texlive 2013"></a>2.安装texlive 2013</h2><p>这个安装比较简单，我用的是ubuntu12.04.4。 具体步骤是，mount一下你下载的iso文件。</p>
<figure class="highlight bash"><table><tr><td class="code"><pre><span class="line">sudo mkdir /media/texlive</span><br><span class="line">sudo mount texlive2013-20130530.iso  /media/texlive  </span><br></pre></td></tr></table></figure>
<p>然后进入到 /media/texlive目录下，执行：</p>
<figure class="highlight bash"><table><tr><td class="code"><pre><span class="line">./install-tl  </span><br></pre></td></tr></table></figure>
<p>提示输入的时候，输入I (大写的i，会看到提示的)<br>安装完成后，可以向/etc/profile文件的最后一行添加如下代码，注意，我的系统是64位的，你要看看你自己的系统是不是在这个目录下有latex命令。</p>
<figure class="highlight bash"><table><tr><td class="code"><pre><span class="line"><span class="built_in">export</span> PATH=/usr/<span class="built_in">local</span>/texlive/2013/bin/x86_64-linux:<span class="variable">$PATH</span>  </span><br></pre></td></tr></table></figure>
<p>如果你想使用帮助的话，还可以向～/.bashrc中添加下面两行：</p>
<figure class="highlight bash"><table><tr><td class="code"><pre><span class="line"><span class="built_in">export</span> MANPATH=/usr/<span class="built_in">local</span>/texlive/2013/texmf-dist/doc/man:<span class="variable">$MANPATH</span>  </span><br><span class="line"><span class="built_in">export</span> INFOPATH=/usr/<span class="built_in">local</span>/texlive/2013/texmf-dist/doc/info:<span class="variable">$INFOPATH</span>  </span><br></pre></td></tr></table></figure>

<p>到这里，我一般会重启一下。<br>测试一下上面的配置是否正确：</p>
<figure class="highlight bash"><table><tr><td class="code"><pre><span class="line"><span class="built_in">which</span> latex  </span><br></pre></td></tr></table></figure>
<p>如果找到了latex，那就可以继续了，找不到的话，你需要重新看一下自己是不是没有配置好环境PATH</p>
<h2 id="3-搞定中文字体"><a href="#3-搞定中文字体" class="headerlink" title="3.搞定中文字体"></a>3.搞定中文字体</h2><h3 id="1-测试中文字体"><a href="#1-测试中文字体" class="headerlink" title="(1)测试中文字体"></a>(1)测试中文字体</h3><p>先写一个简单的测试tex文件。起名为test.tex</p>
<figure class="highlight tex"><table><tr><td class="code"><pre><span class="line"><span class="keyword">\documentclass</span>[UTF8]&#123;ctexart&#125;  </span><br><span class="line"><span class="keyword">\begin</span>&#123;document&#125;  </span><br><span class="line">我爱中国！  </span><br><span class="line"><span class="keyword">\end</span>&#123;document&#125;  </span><br></pre></td></tr></table></figure>
<p>然后执行如下命令编译:</p>
<figure class="highlight bash"><table><tr><td class="code"><pre><span class="line">xelatex test.tex  </span><br></pre></td></tr></table></figure>
<p>等一会，你会遇到一个错误，大致如下：</p>
<figure class="highlight bash"><table><tr><td class="code"><pre><span class="line">!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!  </span><br><span class="line">!  </span><br><span class="line">! fontspec error: <span class="string">&quot;font-not-found&quot;</span>  </span><br><span class="line">!   </span><br><span class="line">! The font <span class="string">&quot;SimSun&quot;</span> cannot be found.  </span><br><span class="line">!   </span><br><span class="line">! See the fontspec documentation <span class="keyword">for</span> further information.  </span><br><span class="line">!   </span><br><span class="line">! For immediate <span class="built_in">help</span> <span class="built_in">type</span> H &lt;<span class="built_in">return</span>&gt;.  </span><br><span class="line">!...............................................   </span><br></pre></td></tr></table></figure>
<p>下面就要解决这个问题。</p>
<h3 id="2-解决中文字体问题"><a href="#2-解决中文字体问题" class="headerlink" title="(2)解决中文字体问题"></a>(2)解决中文字体问题</h3><p>错误里说了，”font-not-found”!所以问题在于Texlive找不到所示的<code>SimSun</code>字体。</p>
<h4 id="配置Texlive，使其可以使用系统字体"><a href="#配置Texlive，使其可以使用系统字体" class="headerlink" title="配置Texlive，使其可以使用系统字体"></a>配置Texlive，使其可以使用系统字体</h4><p>参照<a target="_blank" rel="noopener" href="http://tug.org/texlive/doc/texlive-zh-cn/texlive-zh-cn.pdf">官方文档</a>的说法:</p>
<blockquote>
<p>XeTEX和LuaTEX可以使用任何系统安装的字体，而不只是TEX目录树中的那些。它们使用类似但不完全一致的方式实现这一功能。<br>在Windows下TEXLive提供的字体会自动为XeTEX所用。但如果你在Unix兼容的系统中安装了xetex软件包，则需要把系统配置一番XeTEX才能找到随TEXLive安装的那些字体。<br>为了进行配置，xetex 安装后(不管是初始安装还是后来安装的)都会在TEXMFSYSVAR/fonts/conf/texlive-fontconfig.conf 创建一个必需的配置文件。<br>要在整个系统中使用TEXLive的字体(假定你有足够的权限)，请依照下面的步骤来做：</p>
</blockquote>
<ol>
<li>将texlive-fontconfig.conf 文件复制到 /etc/fonts/conf.d/09-texlive.conf。</li>
<li>运行fc-cache -fsv。<br>如果你没有足够的权限执行上述操作，或者只需要把TEXLive字体提供给你自己，可以这么做：</li>
<li>将texlive-fontconfig.conf文件复制到 <del>/.fonts.conf，其中</del>是你的主目录。</li>
<li>运行<code>fc-cache -fv</code>。<br>你可以运行<code>fc-list</code>来查看系统字体的名称。</li>
</ol>
<p>由此可知，执行如下命令即可：</p>
<figure class="highlight bash"><table><tr><td class="code"><pre><span class="line">sudo cp /usr/<span class="built_in">local</span>/texlive/2014/texmf-var/fonts/conf/texlive-fontconfig.conf /etc/fonts/conf.d/09-texlive.conf</span><br><span class="line">sudo fc-cache -fv</span><br></pre></td></tr></table></figure>
<p>现在texlive可以使用系统字体，但是<code>SimSun</code>字体在类UNIX中不存在，所以需要从Windows拷贝。</p>
<h4 id="拷贝SimSun字体到系统中"><a href="#拷贝SimSun字体到系统中" class="headerlink" title="拷贝SimSun字体到系统中"></a>拷贝SimSun字体到系统中</h4><figure class="highlight bash"><table><tr><td class="code"><pre><span class="line">mkdir ～/.fonts  </span><br><span class="line">cp * ~/.fonts  </span><br></pre></td></tr></table></figure>

<p>也可以使用默认的系统文件夹，比如可以用</p>
<figure class="highlight bash"><table><tr><td class="code"><pre><span class="line">mkdir /usr/share/fonts/windowsfonts</span><br><span class="line">cp * /usr/share/fonts/windowsfonts</span><br></pre></td></tr></table></figure>

<p>然后执行如下命令，修改字体权限并再次更新字体缓存：</p>
<figure class="highlight bash"><table><tr><td class="code"><pre><span class="line">sudo chmod +x *</span><br><span class="line">sudo mkfontscale  </span><br><span class="line">sudo mkfontdir  </span><br><span class="line">sudo fc-cache -fsv  </span><br></pre></td></tr></table></figure>

<p>执行成功后，再做如下操作：</p>
<figure class="highlight bash"><table><tr><td class="code"><pre><span class="line"><span class="built_in">cd</span>  /usr/<span class="built_in">local</span>/texlive/2013/texmf-dist/tex/latex/ctex/fontset/  </span><br><span class="line">sudo vim ctex-xecjk-winfonts.def  </span><br></pre></td></tr></table></figure>
<p>文件定义了xeCJK字体设置，内容大致如下：</p>
<figure class="highlight tex"><table><tr><td class="code"><pre><span class="line"><span class="comment">% ctex-xecjk-winfonts.def: Windows 的 xeCJK 字体设置，默认为六种中易字体  </span></span><br><span class="line"><span class="comment">% vim:ft=tex  </span></span><br><span class="line"><span class="keyword">\setCJKmainfont</span>[BoldFont=&#123;SimHei&#125;,ItalicFont=&#123;[SIMKAI.TTF]&#125;]  </span><br><span class="line">&#123;SimSun&#125;  </span><br><span class="line"><span class="keyword">\setCJKsansfont</span>&#123;SimHei&#125;  </span><br><span class="line"><span class="keyword">\setCJKmonofont</span>&#123;[SIMFANG.TTF]&#125;  </span><br><span class="line"><span class="keyword">\setCJKfamilyfont</span>&#123;zhsong&#125;&#123;SimSun&#125;  </span><br><span class="line"><span class="keyword">\setCJKfamilyfont</span>&#123;zhhei&#125;&#123;SimHei&#125;  </span><br><span class="line"><span class="keyword">\setCJKfamilyfont</span>&#123;zhkai&#125;&#123;[SIMKAI.TTF]&#125;  </span><br><span class="line"><span class="keyword">\setCJKfamilyfont</span>&#123;zhfs&#125;&#123;[SIMFANG.TTF]&#125;  </span><br><span class="line"><span class="comment">% \setCJKfamilyfont&#123;zhli&#125;&#123;LiSu&#125;  </span></span><br><span class="line"><span class="comment">% \setCJKfamilyfont&#123;zhyou&#125;&#123;YouYuan&#125;  </span></span><br><span class="line"><span class="keyword">\newcommand</span>*&#123;<span class="keyword">\songti</span>&#125;&#123;<span class="keyword">\CJKfamily</span>&#123;zhsong&#125;&#125; <span class="comment">% 宋体  </span></span><br><span class="line"><span class="keyword">\newcommand</span>*&#123;<span class="keyword">\heiti</span>&#125;&#123;<span class="keyword">\CJKfamily</span>&#123;zhhei&#125;&#125;   <span class="comment">% 黑体  </span></span><br><span class="line"><span class="keyword">\newcommand</span>*&#123;<span class="keyword">\kaishu</span>&#125;&#123;<span class="keyword">\CJKfamily</span>&#123;zhkai&#125;&#125;  <span class="comment">% 楷书  </span></span><br><span class="line"><span class="keyword">\newcommand</span>*&#123;<span class="keyword">\fangsong</span>&#125;&#123;<span class="keyword">\CJKfamily</span>&#123;zhfs&#125;&#125; <span class="comment">% 仿宋  </span></span><br><span class="line"><span class="comment">% \newcommand*&#123;\lishu&#125;&#123;\CJKfamily&#123;zhli&#125;&#125;    % 隶书  </span></span><br><span class="line"><span class="comment">% \newcommand*&#123;\youyuan&#125;&#123;\CJKfamily&#123;zhyou&#125;&#125; % 幼圆</span></span><br><span class="line"><span class="keyword">\endinput</span>  </span><br></pre></td></tr></table></figure>

<p>错误产生的原因在于上面定义的字体不存在或者找不到，所以根据已有字体名对字体名进行修改。<br>下面，打开新的终端，执行如下命令:</p>
<figure class="highlight bash"><table><tr><td class="code"><pre><span class="line">fc-list :lang=zh-cn  </span><br></pre></td></tr></table></figure>

<p>输出大约如下：</p>
<figure class="highlight bash"><table><tr><td class="code"><pre><span class="line">AR PL UMing TW:style=Light  </span><br><span class="line">AR PL UMing HK:style=Light  </span><br><span class="line">文泉驿等宽微米黑,文泉驛等寬微米黑,WenQuanYi Micro Hei Mono:style=Regular  </span><br><span class="line">仿宋,FangSong:style=Normal,obyčejné,Standard,Κανονικά,Regular,Normaali,Normál,Normale,Standaard,Normalny,Обычный,Normálne,Navadno,Arrunta  </span><br><span class="line">標楷體,DFKai\-SB:style=Regular  </span><br><span class="line">AR PL UMing CN:style=Light  </span><br><span class="line">新宋体,NSimSun:style=常规,Regular  </span><br><span class="line">楷体,KaiTi:style=Normal,obyčejné,Standard,Κανονικά,Regular,Normaali,Normál,Normale,Standaard,Normalny,Обычный,Normálne,Navadno,Arrunta  </span><br><span class="line">微软雅黑,Microsoft YaHei:style=Normal,obyčejné,Standard,Κανονικά,Regular,Normaali,Normál,Normale,Standaard,Normalny,Обычный,Normálne,Navadno,Arrunta  </span><br><span class="line">Adobe 楷体 Std,Adobe Kaiti Std,Adobe Kaiti Std R,Adobe 楷体 Std R:style=R,Regular  </span><br><span class="line">Microsoft YaHei UI,Microsoft YaHei UI Light:style=Light,Regular  </span><br></pre></td></tr></table></figure>

<p><strong>注意:输出中有<code>SimSun</code>字样才表示上述两步成功,否则可能复制相关字体不完全。</strong><br>下面需要做的就是将ctex-xecjk-winfonts.def中的字体SIMFANG.TTF改为FangSong，SIMKAI.TTF改为KaiTi。</p>
<p>如果你用vim,可以在vim里执行如下命令：</p>
<figure class="highlight bash"><table><tr><td class="code"><pre><span class="line">:%s/\[SIMFANG.TTF\]/FangSong/g  </span><br><span class="line">:%s/\[SIMKAI.TTF\]/KaiTi/g  </span><br></pre></td></tr></table></figure>
<h3 id="3-测试问题解决"><a href="#3-测试问题解决" class="headerlink" title="(3)测试问题解决"></a>(3)测试问题解决</h3><p>重新执行一下，那个编译命令吧：</p>
<figure class="highlight bash"><table><tr><td class="code"><pre><span class="line">xelatex test.tex  </span><br></pre></td></tr></table></figure>
<p>现在应该没有问题了。</p>
<h3 id="4-调用其他字体"><a href="#4-调用其他字体" class="headerlink" title="(4)调用其他字体"></a>(4)调用其他字体</h3><p>虽然上述方法解决了一些问题，但却还是不能使用微软雅黑之类的字体，下面是解决方案<br>测试文档是：</p>
<figure class="highlight tex"><table><tr><td class="code"><pre><span class="line"><span class="keyword">\documentclass</span>&#123;ctexart&#125;  </span><br><span class="line"><span class="keyword">\setCJKfamilyfont</span>&#123;Microsoft YaHei&#125;&#123;微软雅黑&#125;</span><br><span class="line"><span class="keyword">\newcommand</span>&#123;<span class="keyword">\yah</span>&#125;&#123;<span class="keyword">\CJKfamily</span>&#123;Microsoft YaHei&#125;&#125;  </span><br><span class="line"><span class="keyword">\begin</span>&#123;document&#125;  </span><br><span class="line">注意：UTF-8编码，用XeLaTeX编译，&#123;<span class="keyword">\yah</span> 这里示例为微软雅黑&#125;。<span class="keyword">\\</span>  </span><br><span class="line">效果还可以。  </span><br><span class="line"><span class="keyword">\end</span>&#123;document&#125;  </span><br></pre></td></tr></table></figure>
<p>效果是这样：<br><img src="/2015/02/12/install-tex/tex.png" alt="tex"><br>大功告成。</p>

      
    </div>

    
    
    

    <footer class="post-footer">
        <div class="post-eof"></div>
      
    </footer>
  </article>
</div>




    


<div class="post-block">
  
  

  <article itemscope itemtype="http://schema.org/Article" class="post-content" lang="">
    <link itemprop="mainEntityOfPage" href="https://zhengmingpei.gitee.io/2015/02/06/%E7%BC%96%E7%A8%8B/">

    <span hidden itemprop="author" itemscope itemtype="http://schema.org/Person">
      <meta itemprop="image" content="/images/avatar.gif">
      <meta itemprop="name" content="zhengmingpei">
      <meta itemprop="description" content="">
    </span>

    <span hidden itemprop="publisher" itemscope itemtype="http://schema.org/Organization">
      <meta itemprop="name" content="郑明培的个人博客">
    </span>
      <header class="post-header">
        <h2 class="post-title" itemprop="name headline">
          <a href="/2015/02/06/%E7%BC%96%E7%A8%8B/" class="post-title-link" itemprop="url">当我们在谈论编程的时候，我们在谈论什么</a>
        </h2>

        <div class="post-meta-container">
          <div class="post-meta">
    <span class="post-meta-item">
      <span class="post-meta-item-icon">
        <i class="far fa-calendar"></i>
      </span>
      <span class="post-meta-item-text">发表于</span>

      <time title="创建时间：2015-02-06 15:00:00" itemprop="dateCreated datePublished" datetime="2015-02-06T15:00:00+08:00">2015-02-06</time>
    </span>
      <span class="post-meta-item">
        <span class="post-meta-item-icon">
          <i class="far fa-calendar-check"></i>
        </span>
        <span class="post-meta-item-text">更新于</span>
        <time title="修改时间：2021-11-28 11:03:09" itemprop="dateModified" datetime="2021-11-28T11:03:09+08:00">2021-11-28</time>
      </span>
    <span class="post-meta-item">
      <span class="post-meta-item-icon">
        <i class="far fa-folder"></i>
      </span>
      <span class="post-meta-item-text">分类于</span>
        <span itemprop="about" itemscope itemtype="http://schema.org/Thing">
          <a href="/categories/%E5%A4%A7%E5%AD%A6/" itemprop="url" rel="index"><span itemprop="name">大学</span></a>
        </span>
    </span>

  
</div>

        </div>
      </header>

    
    
    
    <div class="post-body" itemprop="articleBody">
          <p>记得这样一个段子：<br>很多自称喜欢编程的学生来到学校，他们希望学到些东西，能够立刻写出一些有意思的小应用。然而教授却老是教给他们数据结构、算法还有操作系统原理之类的，说这些是基础，学生们得不到自己想学的知识，对这些课程的兴趣也Just so so，实在想不通这一切后决定问教授。<br>教授是这样解释的，要写一个小应用，那是参加北大某鸟或者某培训机构就可以轻松做到的，说到底这是个技工;然而你们的目标不该是APP这么简单，你们需要学习更深刻的东西，才能够超越技工，成为工程师，走出码农的行列。<br>深以为然，就把这段子记在博客上。</p>

      
    </div>

    
    
    

    <footer class="post-footer">
        <div class="post-eof"></div>
      
    </footer>
  </article>
</div>




    


<div class="post-block">
  
  

  <article itemscope itemtype="http://schema.org/Article" class="post-content" lang="">
    <link itemprop="mainEntityOfPage" href="https://zhengmingpei.gitee.io/2015/01/28/gitvim/">

    <span hidden itemprop="author" itemscope itemtype="http://schema.org/Person">
      <meta itemprop="image" content="/images/avatar.gif">
      <meta itemprop="name" content="zhengmingpei">
      <meta itemprop="description" content="">
    </span>

    <span hidden itemprop="publisher" itemscope itemtype="http://schema.org/Organization">
      <meta itemprop="name" content="郑明培的个人博客">
    </span>
      <header class="post-header">
        <h2 class="post-title" itemprop="name headline">
          <a href="/2015/01/28/gitvim/" class="post-title-link" itemprop="url">利用git管理vim插件</a>
        </h2>

        <div class="post-meta-container">
          <div class="post-meta">
    <span class="post-meta-item">
      <span class="post-meta-item-icon">
        <i class="far fa-calendar"></i>
      </span>
      <span class="post-meta-item-text">发表于</span>

      <time title="创建时间：2015-01-28 15:00:00" itemprop="dateCreated datePublished" datetime="2015-01-28T15:00:00+08:00">2015-01-28</time>
    </span>
      <span class="post-meta-item">
        <span class="post-meta-item-icon">
          <i class="far fa-calendar-check"></i>
        </span>
        <span class="post-meta-item-text">更新于</span>
        <time title="修改时间：2021-11-28 12:03:39" itemprop="dateModified" datetime="2021-11-28T12:03:39+08:00">2021-11-28</time>
      </span>
    <span class="post-meta-item">
      <span class="post-meta-item-icon">
        <i class="far fa-folder"></i>
      </span>
      <span class="post-meta-item-text">分类于</span>
        <span itemprop="about" itemscope itemtype="http://schema.org/Thing">
          <a href="/categories/%E5%A4%A7%E5%AD%A6/" itemprop="url" rel="index"><span itemprop="name">大学</span></a>
        </span>
    </span>

  
</div>

        </div>
      </header>

    
    
    
    <div class="post-body" itemprop="articleBody">
          <p>现在流行用git管理vim插件了，这种方法让安装和更新插件变得更加方便。<br>先上一张官网的截图：<br><img src="http://i.imgur.com/Rueh7Cc.png" alt="Vundle-installer"></p>
<h2 id="准备工作"><a href="#准备工作" class="headerlink" title="准备工作"></a>准备工作</h2><ol>
<li>安装好操作系统，这里我用的是<code>debian8</code>，没有在<code>Windows</code>和<code>Mac</code>上尝试</li>
<li>安装好<code>vim</code>和<code>git</code></li>
</ol>
<h2 id="安装步骤"><a href="#安装步骤" class="headerlink" title="安装步骤"></a>安装步骤</h2>
          <!--noindex-->
            <div class="post-button">
              <a class="btn" href="/2015/01/28/gitvim/#more" rel="contents">
                阅读全文 &raquo;
              </a>
            </div>
          <!--/noindex-->
        
      
    </div>

    
    
    

    <footer class="post-footer">
        <div class="post-eof"></div>
      
    </footer>
  </article>
</div>




    


<div class="post-block">
  
  

  <article itemscope itemtype="http://schema.org/Article" class="post-content" lang="">
    <link itemprop="mainEntityOfPage" href="https://zhengmingpei.gitee.io/2014/11/15/jekyll/">

    <span hidden itemprop="author" itemscope itemtype="http://schema.org/Person">
      <meta itemprop="image" content="/images/avatar.gif">
      <meta itemprop="name" content="zhengmingpei">
      <meta itemprop="description" content="">
    </span>

    <span hidden itemprop="publisher" itemscope itemtype="http://schema.org/Organization">
      <meta itemprop="name" content="郑明培的个人博客">
    </span>
      <header class="post-header">
        <h2 class="post-title" itemprop="name headline">
          <a href="/2014/11/15/jekyll/" class="post-title-link" itemprop="url">使用jekyll搭建github pages博客</a>
        </h2>

        <div class="post-meta-container">
          <div class="post-meta">
    <span class="post-meta-item">
      <span class="post-meta-item-icon">
        <i class="far fa-calendar"></i>
      </span>
      <span class="post-meta-item-text">发表于</span>

      <time title="创建时间：2014-11-15 15:00:00" itemprop="dateCreated datePublished" datetime="2014-11-15T15:00:00+08:00">2014-11-15</time>
    </span>
      <span class="post-meta-item">
        <span class="post-meta-item-icon">
          <i class="far fa-calendar-check"></i>
        </span>
        <span class="post-meta-item-text">更新于</span>
        <time title="修改时间：2021-11-28 12:03:50" itemprop="dateModified" datetime="2021-11-28T12:03:50+08:00">2021-11-28</time>
      </span>
    <span class="post-meta-item">
      <span class="post-meta-item-icon">
        <i class="far fa-folder"></i>
      </span>
      <span class="post-meta-item-text">分类于</span>
        <span itemprop="about" itemscope itemtype="http://schema.org/Thing">
          <a href="/categories/%E5%A4%A7%E5%AD%A6/" itemprop="url" rel="index"><span itemprop="name">大学</span></a>
        </span>
    </span>

  
</div>

        </div>
      </header>

    
    
    
    <div class="post-body" itemprop="articleBody">
          <h2 id="起因"><a href="#起因" class="headerlink" title="起因"></a>起因</h2><p>github pages是搭建个人博客的一个优秀平台，由于我之前将博客建在了CSDN，写了含有”翻墙”之类敏感关键词的博客而未审核通过（天朝你懂的），就怒而决定选择新的博客平台，恰好发掘到了github pages。</p>
<h2 id="优点介绍"><a href="#优点介绍" class="headerlink" title="优点介绍"></a>优点介绍</h2><p>我个人在之前查找了很多资料，看了一些博客内容（比如阮一峰的博客），认为github pages有很多优点，比如：</p>
<ul>
<li>github pages无需自己购买主机，直接使用github上的免费空间即可</li>
<li>github pages的可定制化更强，可以使用多种工具和模板，我用的是其官方推荐的jekyll，套用了一个简洁的模板</li>
<li>github pages支持Markdown，而Markdown绝对是书写神器，它让在写文档时进行结构控制和代码高亮变得异常轻松</li>
<li>至于有人说用github pages建站麻烦，其实也不过如此，无非几个步骤而已</li>
</ul>
<h2 id="搭建过程"><a href="#搭建过程" class="headerlink" title="搭建过程"></a>搭建过程</h2><p>至于搭建过程，用Google可以搜索到很多教程，我这里就挑重要的说：</p>
<ol>
<li>推荐使用Linux（如果你是土豪，用Mac），因为在windows上搞会容易出很多很多问题</li>
<li>推荐去github pages的官方主页，那里有用jekyll构建的完整教程，步骤详尽，而且有很多指向jekyll的链接，方便至极</li>
<li>安装<code>Ruby</code>，安装<code>jekyll</code>，也要安装个<code>rake</code></li>
</ol>
<h2 id="使用"><a href="#使用" class="headerlink" title="使用"></a>使用</h2><ul>
<li>要熟悉目录结构，配置文件<code>_config.yml</code></li>
<li>新增文章，可以使用<code>rake post title=&quot;&quot; date=&quot;&quot;</code></li>
<li>美化和代码高亮等可以用更改CSS解决，后者需要的python在Linux上本就安装好了，而在windows下有很多问题，这也是推荐Linux的原因</li>
</ul>
<h2 id="结语"><a href="#结语" class="headerlink" title="结语"></a>结语</h2><p>哈哈，可以享受github pages了。</p>
<h2 id="备注"><a href="#备注" class="headerlink" title="备注"></a>备注</h2><p>这是我<code>_config.yml</code>，尤其要注意几个路径，一定不要错了。这样就可以正确发布到github和引用图片了！</p>
<figure class="highlight yml"><table><tr><td class="code"><pre><span class="line"><span class="comment"># This is the default format. </span></span><br><span class="line"><span class="comment"># For more see: http://jekyllrb.com/docs/permalinks/</span></span><br><span class="line"><span class="attr">permalink:</span> <span class="string">/:categories/:year/:month/:day/:title</span> </span><br><span class="line"></span><br><span class="line"><span class="attr">exclude:</span> [<span class="string">&quot;.rvmrc&quot;</span>, <span class="string">&quot;.rbenv-version&quot;</span>, <span class="string">&quot;README.md&quot;</span>, <span class="string">&quot;Rakefile&quot;</span>, <span class="string">&quot;changelog.md&quot;</span>]</span><br><span class="line"><span class="attr">highlighter:</span> <span class="string">pygments</span></span><br><span class="line"><span class="attr">markdown:</span> <span class="string">redcarpet</span> </span><br><span class="line"><span class="attr">redcarpet:</span></span><br><span class="line">    <span class="attr">extensions:</span></span><br><span class="line">        <span class="bullet">-</span> <span class="string">hard_wrap</span></span><br><span class="line">        <span class="bullet">-</span> <span class="string">no_intra_emphasis</span></span><br><span class="line">        <span class="bullet">-</span> <span class="string">autolink</span></span><br><span class="line">        <span class="bullet">-</span> <span class="string">strikethrough</span></span><br><span class="line">        <span class="bullet">-</span> <span class="string">fenced_code_blocks</span></span><br><span class="line"><span class="comment"># Themes are encouraged to use these universal variables </span></span><br><span class="line"><span class="comment"># so be sure to set them if your theme uses them.</span></span><br><span class="line"><span class="comment">#</span></span><br><span class="line"><span class="attr">title :</span> <span class="string">郑明培的博客</span></span><br><span class="line"><span class="attr">tagline:</span> <span class="string">Site</span> <span class="string">Tagline</span></span><br><span class="line"><span class="attr">author :</span></span><br><span class="line">  <span class="attr">name :</span> <span class="string">Mingpei</span> <span class="string">Zheng</span></span><br><span class="line">  <span class="attr">email :</span> <span class="string">yueyawanbian@gmail.com</span></span><br><span class="line">  <span class="attr">github :</span> <span class="string">Zhengmingpei</span></span><br><span class="line"></span><br><span class="line"><span class="comment"># The production_url is only used when full-domain names are needed</span></span><br><span class="line"><span class="comment"># such as sitemap.txt </span></span><br><span class="line"><span class="comment"># Most places will/should use BASE_PATH to make the urls</span></span><br><span class="line"><span class="comment">#</span></span><br><span class="line"><span class="comment"># If you have set a CNAME (pages.github.com) set your custom domain here.</span></span><br><span class="line"><span class="comment"># Else if you are pushing to username.github.io, replace with your username.</span></span><br><span class="line"><span class="comment"># Finally if you are pushing to a GitHub project page, include the project name at the end.</span></span><br><span class="line"><span class="comment">#</span></span><br><span class="line"><span class="attr">production_url :</span> <span class="string">http://Zhengmingpei.github.io</span></span><br><span class="line"></span><br><span class="line"><span class="comment"># All Jekyll-Bootstrap specific configurations are namespaced into this hash</span></span><br><span class="line"><span class="comment">#</span></span><br><span class="line"><span class="attr">JB :</span></span><br><span class="line">  <span class="attr">version :</span> <span class="number">0.3</span><span class="number">.0</span></span><br><span class="line"></span><br><span class="line">  <span class="comment"># All links will be namespaced by BASE_PATH if defined.</span></span><br><span class="line">  <span class="comment"># Links in your website should always be prefixed with &#123;&#123;BASE_PATH&#125;&#125;</span></span><br><span class="line">  <span class="comment"># however this value will be dynamically changed depending on your deployment situation.</span></span><br><span class="line">  <span class="comment">#</span></span><br><span class="line">  <span class="comment"># CNAME (http://yourcustomdomain.com)</span></span><br><span class="line">  <span class="comment">#   DO NOT SET BASE_PATH </span></span><br><span class="line">  <span class="comment">#   (urls will be prefixed with &quot;/&quot; and work relatively)</span></span><br><span class="line">  <span class="comment">#</span></span><br><span class="line">  <span class="comment"># GitHub Pages (http://username.github.io)</span></span><br><span class="line">  <span class="comment">#   DO NOT SET BASE_PATH </span></span><br><span class="line">  <span class="comment">#   (urls will be prefixed with &quot;/&quot; and work relatively)</span></span><br><span class="line">  <span class="comment">#</span></span><br><span class="line">  <span class="comment"># GitHub Project Pages (http://username.github.io/project-name)</span></span><br><span class="line">  <span class="comment">#</span></span><br><span class="line">  <span class="comment">#   A GitHub Project site exists in the `gh-pages` branch of one of your repositories.</span></span><br><span class="line">  <span class="comment">#  REQUIRED! Set BASE_PATH to: http://username.github.io/project-name</span></span><br><span class="line">  <span class="comment">#</span></span><br><span class="line">  <span class="comment"># CAUTION:</span></span><br><span class="line">  <span class="comment">#   - When in Localhost, your site will run from root &quot;/&quot; regardless of BASE_PATH</span></span><br><span class="line">  <span class="comment">#   - Only the following values are falsy: [&quot;&quot;, null, false]</span></span><br><span class="line">  <span class="comment">#   - When setting BASE_PATH it must be a valid url.</span></span><br><span class="line">  <span class="comment">#     This means always setting the protocol (http|https) or prefixing with &quot;/&quot;</span></span><br><span class="line">  <span class="attr">BASE_PATH :</span> <span class="literal">false</span></span><br><span class="line"></span><br><span class="line">  <span class="comment"># By default, the asset_path is automatically defined relative to BASE_PATH plus the enabled theme.</span></span><br><span class="line">  <span class="comment"># ex: [BASE_PATH]/assets/themes/[THEME-NAME]</span></span><br><span class="line">  <span class="comment">#</span></span><br><span class="line">  <span class="comment"># Override this by defining an absolute path to assets here.</span></span><br><span class="line">  <span class="comment"># ex: </span></span><br><span class="line">  <span class="comment">#   http://s3.amazonaws.com/yoursite/themes/watermelon</span></span><br><span class="line">  <span class="comment">#   /assets</span></span><br><span class="line">  <span class="comment">#</span></span><br><span class="line">  <span class="attr">ASSET_PATH :</span> <span class="literal">false</span></span><br><span class="line"></span><br><span class="line">  <span class="comment"># These paths are to the main pages Jekyll-Bootstrap ships with.</span></span><br><span class="line">  <span class="comment"># Some JB helpers refer to these paths; change them here if needed.</span></span><br><span class="line">  <span class="comment">#</span></span><br><span class="line">  <span class="attr">archive_path:</span> <span class="string">/archive.html</span></span><br><span class="line">  <span class="attr">categories_path :</span> <span class="string">/categories.html</span></span><br><span class="line">  <span class="attr">tags_path :</span> <span class="string">/tags.html</span></span><br><span class="line">  <span class="attr">atom_path :</span> <span class="string">/atom.xml</span></span><br><span class="line">  <span class="attr">rss_path :</span> <span class="string">/rss.xml</span></span><br><span class="line"></span><br><span class="line">  <span class="comment"># Settings for comments helper</span></span><br><span class="line">  <span class="comment"># Set &#x27;provider&#x27; to the comment provider you want to use.</span></span><br><span class="line">  <span class="comment"># Set &#x27;provider&#x27; to false to turn commenting off globally.</span></span><br><span class="line">  <span class="comment">#</span></span><br><span class="line">  <span class="attr">comments :</span></span><br><span class="line">    <span class="attr">provider :</span> <span class="string">disqus</span></span><br><span class="line">    <span class="attr">disqus :</span></span><br><span class="line">      <span class="attr">short_name :</span> <span class="string">jekyllbootstrap</span></span><br><span class="line">    <span class="attr">livefyre :</span></span><br><span class="line">      <span class="attr">site_id :</span> <span class="number">123</span></span><br><span class="line">    <span class="attr">intensedebate :</span></span><br><span class="line">      <span class="attr">account :</span> <span class="string">123abc</span></span><br><span class="line">    <span class="attr">facebook :</span></span><br><span class="line">      <span class="attr">appid :</span> <span class="number">123</span></span><br><span class="line">      <span class="attr">num_posts:</span> <span class="number">5</span></span><br><span class="line">      <span class="attr">width:</span> <span class="number">580</span></span><br><span class="line">      <span class="attr">colorscheme:</span> <span class="string">light</span></span><br><span class="line">   </span><br><span class="line">  <span class="comment"># Settings for analytics helper</span></span><br><span class="line">  <span class="comment"># Set &#x27;provider&#x27; to the analytics provider you want to use.</span></span><br><span class="line">  <span class="comment"># Set &#x27;provider&#x27; to false to turn analytics off globally.</span></span><br><span class="line">  <span class="comment">#        </span></span><br><span class="line">  <span class="attr">analytics :</span></span><br><span class="line">    <span class="attr">provider :</span> <span class="string">google</span> </span><br><span class="line">    <span class="attr">google :</span> </span><br><span class="line">        <span class="attr">tracking_id :</span> <span class="string">&#x27;UA-123-12&#x27;</span></span><br><span class="line">    <span class="attr">getclicky :</span></span><br><span class="line">      <span class="attr">site_id :</span> </span><br><span class="line">    <span class="attr">mixpanel :</span></span><br><span class="line">        <span class="attr">token :</span> <span class="string">&#x27;_MIXPANEL_TOKEN_&#x27;</span></span><br><span class="line">    <span class="attr">piwik :</span></span><br><span class="line">        <span class="attr">baseURL :</span> <span class="string">&#x27;myserver.tld/piwik&#x27;</span> <span class="comment"># Piwik installation address (without protocol)</span></span><br><span class="line">        <span class="attr">idsite :</span> <span class="string">&#x27;1&#x27;</span>                   <span class="comment"># the id of the site on Piwik</span></span><br><span class="line"></span><br><span class="line">  <span class="comment"># Settings for sharing helper. </span></span><br><span class="line">  <span class="comment"># Sharing is for things like tweet, plusone, like, reddit buttons etc.</span></span><br><span class="line">  <span class="comment"># Set &#x27;provider&#x27; to the sharing provider you want to use.</span></span><br><span class="line">  <span class="comment"># Set &#x27;provider&#x27; to false to turn sharing off globally.</span></span><br><span class="line">  <span class="comment">#</span></span><br><span class="line">  <span class="attr">sharing :</span></span><br><span class="line">    <span class="attr">provider :</span> <span class="literal">false</span></span><br><span class="line">    </span><br><span class="line">  <span class="comment"># Settings for all other include helpers can be defined by creating </span></span><br><span class="line">  <span class="comment"># a hash with key named for the given helper. ex:</span></span><br><span class="line">  <span class="comment">#</span></span><br><span class="line">  <span class="comment">#   pages_list :</span></span><br><span class="line">  <span class="comment">#     provider : &quot;custom&quot;   </span></span><br><span class="line">  <span class="comment">#</span></span><br><span class="line">  <span class="comment"># Setting any helper&#x27;s provider to &#x27;custom&#x27; will bypass the helper code</span></span><br><span class="line">  <span class="comment"># and include your custom code. Your custom file must be defined at:</span></span><br><span class="line">  <span class="comment">#   ./_includes/custom/[HELPER]</span></span><br><span class="line">  <span class="comment"># where [HELPER] is the name of the helper you are overriding.</span></span><br></pre></td></tr></table></figure>
<p>就到这里。</p>

      
    </div>

    
    
    

    <footer class="post-footer">
        <div class="post-eof"></div>
      
    </footer>
  </article>
</div>




    


<div class="post-block">
  
  

  <article itemscope itemtype="http://schema.org/Article" class="post-content" lang="">
    <link itemprop="mainEntityOfPage" href="https://zhengmingpei.gitee.io/2014/10/27/windows2048/">

    <span hidden itemprop="author" itemscope itemtype="http://schema.org/Person">
      <meta itemprop="image" content="/images/avatar.gif">
      <meta itemprop="name" content="zhengmingpei">
      <meta itemprop="description" content="">
    </span>

    <span hidden itemprop="publisher" itemscope itemtype="http://schema.org/Organization">
      <meta itemprop="name" content="郑明培的个人博客">
    </span>
      <header class="post-header">
        <h2 class="post-title" itemprop="name headline">
          <a href="/2014/10/27/windows2048/" class="post-title-link" itemprop="url">Windows控制台版2048</a>
        </h2>

        <div class="post-meta-container">
          <div class="post-meta">
    <span class="post-meta-item">
      <span class="post-meta-item-icon">
        <i class="far fa-calendar"></i>
      </span>
      <span class="post-meta-item-text">发表于</span>

      <time title="创建时间：2014-10-27 15:00:00" itemprop="dateCreated datePublished" datetime="2014-10-27T15:00:00+08:00">2014-10-27</time>
    </span>
      <span class="post-meta-item">
        <span class="post-meta-item-icon">
          <i class="far fa-calendar-check"></i>
        </span>
        <span class="post-meta-item-text">更新于</span>
        <time title="修改时间：2021-11-28 11:11:43" itemprop="dateModified" datetime="2021-11-28T11:11:43+08:00">2021-11-28</time>
      </span>
    <span class="post-meta-item">
      <span class="post-meta-item-icon">
        <i class="far fa-folder"></i>
      </span>
      <span class="post-meta-item-text">分类于</span>
        <span itemprop="about" itemscope itemtype="http://schema.org/Thing">
          <a href="/categories/%E5%A4%A7%E5%AD%A6/" itemprop="url" rel="index"><span itemprop="name">大学</span></a>
        </span>
    </span>

  
</div>

        </div>
      </header>

    
    
    
    <div class="post-body" itemprop="articleBody">
          <p><strong><code>2015/1/28</code>更新</strong><br>上一篇说了Linux控制台版的2048，这次是对代码进行简单修改后的Windows版2048。</p>
<p>运行效果如下：<br><img src="/2014/10/27/windows2048/windows2048.gif" alt="windows2048"><br>与Linux版本相比，核心代码没有改动，只是改变终端颜色函数的部分做了调整。</p>
<p>不过，在Windows下，使用VS2013 Express，与GCC有所不同，所以做了一些处理，并对原有代码做了整理，使之No Warning。后来发现用低版本和Code::blocks编译会出错，大概与低版本和Mingw找不到<code>s_printf</code>函数有关，所以目前这个版本还是只能使用VS2013编译。代码同样放在在Github，可以点<a target="_blank" rel="noopener" href="https://github.com/ZhengMingpei/2048.c/tree/master/windows">这里</a>查看。</p>

      
    </div>

    
    
    

    <footer class="post-footer">
        <div class="post-eof"></div>
      
    </footer>
  </article>
</div>




    


<div class="post-block">
  
  

  <article itemscope itemtype="http://schema.org/Article" class="post-content" lang="">
    <link itemprop="mainEntityOfPage" href="https://zhengmingpei.gitee.io/2014/10/22/windowscolor/">

    <span hidden itemprop="author" itemscope itemtype="http://schema.org/Person">
      <meta itemprop="image" content="/images/avatar.gif">
      <meta itemprop="name" content="zhengmingpei">
      <meta itemprop="description" content="">
    </span>

    <span hidden itemprop="publisher" itemscope itemtype="http://schema.org/Organization">
      <meta itemprop="name" content="郑明培的个人博客">
    </span>
      <header class="post-header">
        <h2 class="post-title" itemprop="name headline">
          <a href="/2014/10/22/windowscolor/" class="post-title-link" itemprop="url">Windows下用C语言设置控制台颜色</a>
        </h2>

        <div class="post-meta-container">
          <div class="post-meta">
    <span class="post-meta-item">
      <span class="post-meta-item-icon">
        <i class="far fa-calendar"></i>
      </span>
      <span class="post-meta-item-text">发表于</span>

      <time title="创建时间：2014-10-22 15:00:00" itemprop="dateCreated datePublished" datetime="2014-10-22T15:00:00+08:00">2014-10-22</time>
    </span>
      <span class="post-meta-item">
        <span class="post-meta-item-icon">
          <i class="far fa-calendar-check"></i>
        </span>
        <span class="post-meta-item-text">更新于</span>
        <time title="修改时间：2021-11-28 11:08:49" itemprop="dateModified" datetime="2021-11-28T11:08:49+08:00">2021-11-28</time>
      </span>
    <span class="post-meta-item">
      <span class="post-meta-item-icon">
        <i class="far fa-folder"></i>
      </span>
      <span class="post-meta-item-text">分类于</span>
        <span itemprop="about" itemscope itemtype="http://schema.org/Thing">
          <a href="/categories/%E5%A4%A7%E5%AD%A6/" itemprop="url" rel="index"><span itemprop="name">大学</span></a>
        </span>
    </span>

  
</div>

        </div>
      </header>

    
    
    
    <div class="post-body" itemprop="articleBody">
          <h2 id="C语言小程序在Windows下设置控制台颜色"><a href="#C语言小程序在Windows下设置控制台颜色" class="headerlink" title="C语言小程序在Windows下设置控制台颜色"></a>C语言小程序在Windows下设置控制台颜色</h2><p>其实很简单，主要通过<code>SetConsoleTextAttribute</code>函数的参数。关于这个函数的原始声明，可以查找MSDN的API说明，也可见下文。<br>改变第二个参数后，再加上简单的循环，可以得到很有趣的效果，就像下图的色表：<br><img src="/2014/10/22/windowscolor/cmdcolor.png" alt="cmdcolor"><br>其实现代码如下:</p>
<figure class="highlight c"><table><tr><td class="code"><pre><span class="line"><span class="meta">#<span class="meta-keyword">include</span> <span class="meta-string">&lt;stdio.h&gt;</span></span></span><br><span class="line"><span class="meta">#<span class="meta-keyword">include</span> <span class="meta-string">&lt;windows.h&gt;</span></span></span><br><span class="line"></span><br><span class="line"><span class="function"><span class="keyword">int</span> <span class="title">main</span><span class="params">(<span class="keyword">void</span>)</span></span></span><br><span class="line"><span class="function"></span>&#123;</span><br><span class="line">	HANDLE consolehwnd;<span class="comment">//创建句柄，详细句柄知识，请百度一下或查MSDN</span></span><br><span class="line">	consolehwnd = GetStdHandle(STD_OUTPUT_HANDLE);<span class="comment">//实例化句柄</span></span><br><span class="line">	SetConsoleTextAttribute(consolehwnd, <span class="number">15</span>);</span><br><span class="line">	<span class="built_in">printf</span>(<span class="string">&quot;                             Console color list...\n&quot;</span>);</span><br><span class="line">	<span class="keyword">for</span> (<span class="keyword">int</span> i = <span class="number">0</span>; i &lt; <span class="number">256</span>; i++)</span><br><span class="line">	&#123;</span><br><span class="line">		SetConsoleTextAttribute(consolehwnd, i);</span><br><span class="line">		<span class="built_in">printf</span>(<span class="string">&quot;%5d&quot;</span>, i);</span><br><span class="line">	&#125;</span><br><span class="line">	SetConsoleTextAttribute(consolehwnd, <span class="number">15</span>);</span><br><span class="line">	<span class="built_in">printf</span>(<span class="string">&quot;hello!\n&quot;</span>);</span><br><span class="line">	<span class="built_in">printf</span>(<span class="string">&quot;It is really beautiful!\n&quot;</span>);</span><br><span class="line">	system(<span class="string">&quot;pause&quot;</span>);</span><br><span class="line">	<span class="keyword">return</span> <span class="number">0</span>;</span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure>

<h2 id="SetConsoleTextAttribute-函数原型"><a href="#SetConsoleTextAttribute-函数原型" class="headerlink" title="SetConsoleTextAttribute()函数原型"></a>SetConsoleTextAttribute()函数原型</h2><p>SetConsoleTextAttribute function<br>Sets the attributes of characters written to the console screen buffer by the <a target="_blank" rel="noopener" href="http://msdn.microsoft.com/en-us/library/aa365747(v=vs.85).aspx">WriteFile</a> or <a target="_blank" rel="noopener" href="http://msdn.microsoft.com/en-us/library/ms687401(v=vs.85).aspx">WriteConsole</a> function, or echoed by the <a target="_blank" rel="noopener" href="http://msdn.microsoft.com/en-us/library/aa365467(v=vs.85).aspx">ReadFile</a> or <a target="_blank" rel="noopener" href="http://msdn.microsoft.com/en-us/library/ms684958(v=vs.85).aspx">ReadConsole</a> function. This function affects text written after the function call.</p>
<h3 id="Syntax"><a href="#Syntax" class="headerlink" title="Syntax"></a>Syntax</h3><figure class="highlight c"><table><tr><td class="code"><pre><span class="line"><span class="function">BOOL WINAPI <span class="title">SetConsoleTextAttribute</span><span class="params">(</span></span></span><br><span class="line"><span class="params"><span class="function">    _In_  HANDLE hConsoleOutput,</span></span></span><br><span class="line"><span class="params"><span class="function">    _In_  WORD wAttributes</span></span></span><br><span class="line"><span class="params"><span class="function">)</span></span>;</span><br></pre></td></tr></table></figure>

<h3 id="Parameters"><a href="#Parameters" class="headerlink" title="Parameters"></a>Parameters</h3><p>hConsoleOutput [in]</p>
<blockquote>
<p>A handle to the console screen buffer. The handle must have the GENERIC_READ access right. For more information, see Console Buffer Security and Access Rights.</p>
</blockquote>
<p>wAttributes [in]</p>
<blockquote>
<p><a target="_blank" rel="noopener" href="http://msdn.microsoft.com/en-us/library/ms682088(v=vs.85).aspx#_win32_character_attributes">The character attributes</a>.</p>
</blockquote>
<h3 id="Return-value"><a href="#Return-value" class="headerlink" title="Return value"></a>Return value</h3><p>If the function succeeds, the return value is nonzero.<br>If the function fails, the return value is zero. To get extended error information, call <a target="_blank" rel="noopener" href="http://msdn.microsoft.com/en-us/library/ms679360(v=vs.85).aspx">GetLastError</a>.</p>
<h3 id="Remarks"><a href="#Remarks" class="headerlink" title="Remarks"></a>Remarks</h3><p>To determine the current color attributes of a screen buffer, call the <a target="_blank" rel="noopener" href="http://msdn.microsoft.com/en-us/library/ms683171(v=vs.85).aspx">GetConsoleScreenBufferInfo</a> function.</p>
<h3 id="Examples"><a href="#Examples" class="headerlink" title="Examples"></a>Examples</h3><p>For an example, see <a target="_blank" rel="noopener" href="http://msdn.microsoft.com/en-us/library/ms686974(v=vs.85).aspx">Using the High-Level Input and Output Functions</a>.</p>
<h3 id="Requirements"><a href="#Requirements" class="headerlink" title="Requirements"></a>Requirements</h3><p>Minimum supported client<br>Windows 2000 Professional [desktop apps only]<br>Minimum supported server<br>Windows 2000 Server [desktop apps only]</p>
<p>Header</p>
<blockquote>
<p>Wincon.h (include Windows.h)</p>
</blockquote>
<p>Library</p>
<blockquote>
<p>Kernel32.lib</p>
</blockquote>
<p>DLL</p>
<blockquote>
<p>Kernel32.dll</p>
</blockquote>

      
    </div>

    
    
    

    <footer class="post-footer">
        <div class="post-eof"></div>
      
    </footer>
  </article>
</div>




    


<div class="post-block">
  
  

  <article itemscope itemtype="http://schema.org/Article" class="post-content" lang="">
    <link itemprop="mainEntityOfPage" href="https://zhengmingpei.gitee.io/2014/10/19/linux2048/">

    <span hidden itemprop="author" itemscope itemtype="http://schema.org/Person">
      <meta itemprop="image" content="/images/avatar.gif">
      <meta itemprop="name" content="zhengmingpei">
      <meta itemprop="description" content="">
    </span>

    <span hidden itemprop="publisher" itemscope itemtype="http://schema.org/Organization">
      <meta itemprop="name" content="郑明培的个人博客">
    </span>
      <header class="post-header">
        <h2 class="post-title" itemprop="name headline">
          <a href="/2014/10/19/linux2048/" class="post-title-link" itemprop="url">Linux控制台版本2048</a>
        </h2>

        <div class="post-meta-container">
          <div class="post-meta">
    <span class="post-meta-item">
      <span class="post-meta-item-icon">
        <i class="far fa-calendar"></i>
      </span>
      <span class="post-meta-item-text">发表于</span>

      <time title="创建时间：2014-10-19 15:00:00" itemprop="dateCreated datePublished" datetime="2014-10-19T15:00:00+08:00">2014-10-19</time>
    </span>
      <span class="post-meta-item">
        <span class="post-meta-item-icon">
          <i class="far fa-calendar-check"></i>
        </span>
        <span class="post-meta-item-text">更新于</span>
        <time title="修改时间：2021-11-28 11:11:54" itemprop="dateModified" datetime="2021-11-28T11:11:54+08:00">2021-11-28</time>
      </span>
    <span class="post-meta-item">
      <span class="post-meta-item-icon">
        <i class="far fa-folder"></i>
      </span>
      <span class="post-meta-item-text">分类于</span>
        <span itemprop="about" itemscope itemtype="http://schema.org/Thing">
          <a href="/categories/%E5%A4%A7%E5%AD%A6/" itemprop="url" rel="index"><span itemprop="name">大学</span></a>
        </span>
    </span>

  
</div>

        </div>
      </header>

    
    
    
    <div class="post-body" itemprop="articleBody">
          <p>在Github上看到一个荷兰人写的linux控制台版的2048，用的C语言，感觉很有意思。<br><img src="/2014/10/19/linux2048/linux2048.png" alt="linxu2048"></p>
<p>读了一下他的源码，感觉写的不错，就厚着脸皮加了一些中文注释，源码网址可以到在<a target="_blank" rel="noopener" href="https://github.com/ZhengMingpei/2048.c.git">这里</a>查找。</p>

      
    </div>

    
    
    

    <footer class="post-footer">
        <div class="post-eof"></div>
      
    </footer>
  </article>
</div>




  <nav class="pagination">
    <a class="extend prev" rel="prev" href="/page/2/"><i class="fa fa-angle-left" aria-label="上一页"></i></a><a class="page-number" href="/">1</a><a class="page-number" href="/page/2/">2</a><span class="page-number current">3</span><a class="page-number" href="/page/4/">4</a><a class="extend next" rel="next" href="/page/4/"><i class="fa fa-angle-right" aria-label="下一页"></i></a>
  </nav>

</div>
  </main>

  <footer class="footer">
    <div class="footer-inner">


<div class="copyright">
  &copy; 
  <span itemprop="copyrightYear">2021</span>
  <span class="with-love">
    <i class="fa fa-heart"></i>
  </span>
  <span class="author" itemprop="copyrightHolder">zhengmingpei</span>
</div>
  <div class="powered-by">由 <a href="https://hexo.io/" rel="noopener" target="_blank">Hexo</a> & <a href="https://theme-next.js.org/pisces/" rel="noopener" target="_blank">NexT.Pisces</a> 强力驱动
  </div>

    </div>
  </footer>

  
  <script src="https://cdn.jsdelivr.net/npm/animejs@3.2.1/lib/anime.min.js" integrity="sha256-XL2inqUJaslATFnHdJOi9GfQ60on8Wx1C2H8DYiN1xY=" crossorigin="anonymous"></script>
<script src="/js/comments.js"></script><script src="/js/utils.js"></script><script src="/js/motion.js"></script><script src="/js/next-boot.js"></script>

  





  





</body>
</html>
